package com.coder4j.mapper;

import com.coder4j.starter.mybatis.BaseMapper;
import com.coder4j.entity.SDisplayInterfaceDetailEntity;
import com.coder4j.vo.SDisplayInterfaceDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Value;

import java.util.Arrays;
import java.util.List;

/**
 * 显示界面兴趣区详情
 * @author keller
 * @date 2025-03-18 16:22:26
 */
@Mapper
public interface SDisplayInterfaceDetailMapper extends BaseMapper<SDisplayInterfaceDetailEntity>{
	/**
     * 默认查询条件
     * @return
     */
    @Override
    default List<String> defaultCondition(){
    return Arrays.asList(
			" <if test = 'displayInterfaceId!=null'> display_interface_id=#{displayInterfaceId} </if>",
			" <if test = 'taskFlow!=null'> AND task_flow=#{taskFlow} </if>",
			" <if test = 'taskFlowDetailId!=null'> AND task_flow_detail_id=#{taskFlowDetailId} </if>",
            " <if test = 'createId!=null'> AND create_id=#{createId} </if>",
            " <if test = 'updateId!=null'> AND update_id=#{updateId} </if>");
    }


    void delById(@Value("id") String id);

    List<SDisplayInterfaceDetailVO> getById(@Value("id") Integer id);
}
